package CollectionList;

import java.util.ArrayList;
import java.util.List;

public class GeneList {
    public static void main(String[] args) {
        useStringList();
    }
    private static List<String> CreateStringList(){
        List<String> list = new ArrayList<String>();
        list.add("A");
        list.add("B");
        list.add("C");
        list.add("D");
        return list;
    }
    private static void useStringList(){
        List<String> list = CreateStringList();
        for (int i = 0; i < list.size(); i++) {
            //不用再强转，直接用
            System.out.println(list.get(i).toUpperCase());
        }
    }
}
